package api;

import util.HttpClientUtil;
import util.ResponseData;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;

public class LoginApi {
    private static String login_url="http://ihrm-test.itheima.net/api/sys/login";
    public static ResponseData login(String mobile,String pwd) throws IOException, URISyntaxException {
        Map<String,Object> data=new HashMap<>();
        data.put("mobile",mobile);
        data.put("password",pwd);
        return HttpClientUtil.post_json(login_url, null, data);

    }

}
